package com.zsrt.java.day20161226.zzm.demo03;

import java.util.Scanner;

import org.junit.Test;

public class MaxTest {
	
	public static void main(String[] args) {
		Scanner sc=new Scanner(System.in);
		while(true){
			System.out.println("请你输出第一个数:");
			int a=sc.nextInt();
			System.out.println("请您输出第二个数:");
			int b=sc.nextInt();
			System.out.println("较大的数为:"+maxTest(a,b));
			System.out.println("继续请按c,退出请按y");
			String temp = sc.next();
			if(temp.equals("y")){
				System.out.println("程序已经退出.....");
				break;
			}
		}
		sc.close();
	}
	
	public static int maxTest(int a,int b){
		
		int temp;
		if(a>b){
			temp = a;
		}else{
			temp = b;
		}
		return temp;
	}
}
